package com.ruoyi.web.controller.prevention;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.entity.PreventionTaskNum;
import com.ruoyi.system.service.PreventionTaskNumService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 危险化学品企业重大危险源安全包保责任人隐患排查任务清单(PreventionTaskNum)表控制层
 *
 * @author makejava
 * @since 2023-06-19 15:36:18
 */
@RestController
@RequestMapping("preventionTaskNum")
public class PreventionTaskNumController extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private PreventionTaskNumService preventionTaskNumService;

    /**
     * 分页查询
     *
     * @param preventionTaskNum 筛选条件
     * @return 查询结果
     */
    @GetMapping("list")
    public TableDataInfo queryByPage(PreventionTaskNum preventionTaskNum) {
        startPage();
        List<PreventionTaskNum> preventionTaskNums = this.preventionTaskNumService.queryByPage(preventionTaskNum);
        return getDataTable(preventionTaskNums);
    }

}

